package com.candy.control;

import com.candy.bean.DishInfo;
import com.candy.service.SaveDishInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RestController
public class SaveDishInfoController {
@Autowired
SaveDishInfoService saveDishInfoService;
@RequestMapping("/savedishinfo")
    public String saveDishInfo(DishInfo dishInfo) {
    if(saveDishInfoService.saveDishInfo(dishInfo) > 0)
    return "success";
    else return "fail";
    }
}
